using System;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;

namespace Golang.Ioc;

internal static partial  class NativeLib
{
    private const string LibName = "Golang.Ioc.Interop.dll";

    [UnmanagedCallConv(CallConvs = new Type[] { typeof(CallConvStdcall) })]
    [LibraryImport(LibName, StringMarshalling = StringMarshalling.Custom, StringMarshallingCustomType = typeof(CGoStringMarshaller))]
    [return: MarshalAs(UnmanagedType.Bool)]
    internal static partial bool Check([MarshalAs(UnmanagedType.I4)]int i1, [MarshalAs(UnmanagedType.I4)] int i2);

    [UnmanagedCallConv(CallConvs = new Type[] { typeof(CallConvStdcall) })]
    [LibraryImport(LibName, StringMarshalling = StringMarshalling.Custom,StringMarshallingCustomType = typeof(CGoStringMarshaller))]
    //[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CStringMarshaler))]
        //[MarshalUsing(typeof(CGoStringMarshaller))]
    internal static partial string GetSlogan(
            string name
     );

    [UnmanagedCallConv(CallConvs = new Type[] { typeof(CallConvStdcall) })]
    [LibraryImport(LibName, StringMarshalling = StringMarshalling.Custom,StringMarshallingCustomType = typeof(CGoStringMarshaller))]
    internal static partial void Free(IntPtr ptr);

}
